Golang - 條件式與迴圈



if-else

if condition {
    ...
} else {
    ...
}

switch

switch condition {
case c1:
    ...
case c2:
    ...
default:
    ...
}

for

for i := 0; i < count; i++ {
    ...
}

while

for {
    ...
}
#golang #GO







你可能感興趣的文章

PHP 語法基礎

PHP 語法基礎

JS 時間日期處理

JS 時間日期處理

[React 04] props

[React 04] props






留言討論